{% extends 'common/panel.html' %}
{% block title %}{{mpa.name}} Potential Impact Analysis{% endblock title %}
{% block panel %}
<h3>{{all_results.0.0.group}} Potential Impact Analysis Report</h3>
<div class='freetext'>
<br>
<table  style='width:450px' class='impact_analysis_container'>
    <thead>
        <tr>
            <th></th>
            <th><b>Percent on Total Value</b> affected by MPA</th>
            <th></th>
            <th><b>Percent on Total Area</b> affected by MPA</th>
        </tr>
    </thead>
    <tbody>
    {% for results in all_results %}
        <tr><td></td><td></td><td></td><td></td></tr>
        <tr>
            {% if 'Recreational' in all_results.0.0.group and results.0.port == 'Fort Bragg' %}
                <td style="width: 165px;" class="species_name"><b>Fort Bragg / Albion</b></td>
            {% else %}
                <td style="width: 165px;" class="species_name"><b>{{ results.0.port }}</b></td>
            {% endif %}
            <td></td>
            <td></td>
            <td></td>
        </tr>
        <tr><td></td><td></td><td></td><td></td></tr>
        {% for result in results %}
        <tr class="{% cycle '' 'grey' %}">
            <td class="species_name">{{ result.species }}</td>
            {% if result.percOverallValue == '---' %}
                <td>---</td>
            {% else %}
                <td>{{ result.percOverallValue|floatformat:'1' }}&nbsp;<small>%</small></td>
            {% endif %}
            <td></td>
            {% if result.percOverallArea == '---' %}
                <td>---</td>
            {% else %}
                <td>{{ result.percOverallArea|floatformat:'1' }}&nbsp;<small>%</small></td>
            {% endif %}
        </tr>
        {% endfor %}
        <tr><td></td><td></td><td></td><td></td></tr>
    {% endfor %}
    </tbody>
</table>

</div>
<br>
<div style='font-size: small'><a target='_blank' href='{% url mpa_printable_analysis mpa.id all_results.0.0.group %}'>View Printable Report</a></div>
<br>
{% endblock panel %}
